package com.servicebuck.database.entity;
// Generated Aug 30, 2011 11:09:02 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Serviceorder generated by hbm2java
 */
@Entity
@Table(name="serviceorder"
    ,catalog="telluricng"
)
public class Serviceorder  implements java.io.Serializable {


     private long orderId;
     private Orderstatus orderstatus;
     private Paymenttype paymenttype;
     private Offering offering;
     private Date serviceStartDate;
     private Date serviceEndDate;
     private String inactive;
     private Set<Ticket> tickets = new HashSet<Ticket>(0);

    public Serviceorder() {
    }

	
    public Serviceorder(long orderId, Orderstatus orderstatus, Paymenttype paymenttype, Date serviceStartDate) {
        this.orderId = orderId;
        this.orderstatus = orderstatus;
        this.paymenttype = paymenttype;
        this.serviceStartDate = serviceStartDate;
    }
    public Serviceorder(long orderId, Orderstatus orderstatus, Paymenttype paymenttype, Offering offering, Date serviceStartDate, Date serviceEndDate, String inactive, Set<Ticket> tickets) {
       this.orderId = orderId;
       this.orderstatus = orderstatus;
       this.paymenttype = paymenttype;
       this.offering = offering;
       this.serviceStartDate = serviceStartDate;
       this.serviceEndDate = serviceEndDate;
       this.inactive = inactive;
       this.tickets = tickets;
    }
   
     @Id 

    
    @Column(name="order_id", unique=true, nullable=false)
    public long getOrderId() {
        return this.orderId;
    }
    
    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="order_status_id", nullable=false)
    public Orderstatus getOrderstatus() {
        return this.orderstatus;
    }
    
    public void setOrderstatus(Orderstatus orderstatus) {
        this.orderstatus = orderstatus;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="payment_type", nullable=false)
    public Paymenttype getPaymenttype() {
        return this.paymenttype;
    }
    
    public void setPaymenttype(Paymenttype paymenttype) {
        this.paymenttype = paymenttype;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="offering_id")
    public Offering getOffering() {
        return this.offering;
    }
    
    public void setOffering(Offering offering) {
        this.offering = offering;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="service_start_date", nullable=false, length=19)
    public Date getServiceStartDate() {
        return this.serviceStartDate;
    }
    
    public void setServiceStartDate(Date serviceStartDate) {
        this.serviceStartDate = serviceStartDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="service_end_date", length=19)
    public Date getServiceEndDate() {
        return this.serviceEndDate;
    }
    
    public void setServiceEndDate(Date serviceEndDate) {
        this.serviceEndDate = serviceEndDate;
    }

    
    @Column(name="inactive", length=45)
    public String getInactive() {
        return this.inactive;
    }
    
    public void setInactive(String inactive) {
        this.inactive = inactive;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="serviceorder")
    public Set<Ticket> getTickets() {
        return this.tickets;
    }
    
    public void setTickets(Set<Ticket> tickets) {
        this.tickets = tickets;
    }




}


